//
//  YPHSDepositoryView.h
//  ChengHuiTong
//
//  Created by CHT-Technology on 2017/6/8.
//  Copyright © 2017年 张文权. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, YPHSDepositoryViewState) {
    YPHSDepositoryViewInitial, //初始状态
    YPHSDepositoryViewNotOpen, //未开通
    YPHSDepositoryViewNotActive, //已开通未激活
    YPHSDepositoryViewOpenedNormal, //已开通且正常
    YPHSDepositoryViewNotBind, //未绑卡
    YPHSDepositoryViewHasBind, //已绑卡
    
};

@interface YPHSDepositoryView : UIView

/**
 构造函数

 @param frame 坐标
 @param state 存管状态
 @return 实例
 */
- (instancetype)initWithFrame:(CGRect)frame
                        state:(YPHSDepositoryViewState)state;



/**
 更新子视图

 @param hs_state 徽商电子账户状态0：未开通 1：已开通且正常 2：已开通待激活
 @param hs_account 徽商电子账户ID，19位纯数字，未开通时则为空字符串
 @param hs_cardBank 银行卡字母代码，未绑卡时则为空字符串
 @param hs_card_realname 银行卡账户名，未绑卡时则为空字符串
 @param hs_card_number 银行卡卡号，未绑卡时则为空字符串
 */
- (void)updateSubViewsWithHsState:(NSString *)hs_state
                        hsAccount:(NSString *)hs_account
                       hsCardBank:(NSString *)hs_cardBank
                   hsCardRealname:(NSString *)hs_card_realname
                     hsCardNumber:(NSString *)hs_card_number;



/**
 复原
 */
- (void)restore;


/**
 处理回调事件
 
 @param bindBlcok 绑定银行卡事件
 @param openBlock 开通存管事件
 */
- (void)configActionsWithBindBlock:(dispatch_block_t)bindBlcok
                         openBlock:(dispatch_block_t)openBlock;

@end
